Skip to main content

start session

Type

command

Summary

Begins a server session.

Syntax

start session

Description

Use the start session command to begin a server session. The contents of the $_SESSION array is restored if available.

If no session identifier is specified by the sessionId property or contained within the session cookie, then a new session will be created with a unique identifier, and the contents of the session cookie set to that identifier.

The location where the $_SESSION array is stored on the server is configured using the sessionSavePath property.

A session is stored until it expires or is deleted using the delete session command. The maximum age of a session is configured using the sessionLifetime property.

note

You do not need to alter any of the session properties in order to start and use sessions. They provide a way for advanced users to configure the way session work.

warning

Session properties cannot be changed once a session has been created.

Examples

start session
start session
put "jack" into $_SESSION['user']
set the sessionLifeTime to 360 -- 6 minutes
start session

command: stop session, delete session

glossary: property

keyword: $_SESSION

property: sessionSavePath, sessionLifetime, sessionName, sessionId

Compatibility and Support

Introduced

LiveCode 5.0

OS

mac

windows

linux

Platforms

server

Thank you for your feedback!

Was this page helpful?